//
//  HHDatePickerView.h
//  Pods
//
//  Created by chun.chen on 2018/6/13.
//  日期选择期picker

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface HHDatePickerView : UIView

@property (nonatomic, strong, readonly) UIDatePicker *datePicker;

/// 确定按钮
@property (nonatomic, strong, readonly) UIButton *doneButton;
/// 取消按钮
@property (nonatomic, strong, readonly) UIButton *cancelButton;

/// 当前选择的日期
@property (nonatomic, strong) NSDate *currentDate;
/// 选择日期的回调
@property (nonatomic, copy, nullable) void(^completeBlock)(NSDate * date);
/// 取消
@property (nonatomic, copy, nullable) void(^cancelBlock)(void);

//MARK: - public

///  弹出日期选择框
/// - Parameters:
///   - aView: 父视图
///   - date: 当前显示日期
///   - minDate: 最小日期
///   - maxDate: 最大日期
///   - complete: complete description
+ (instancetype)showDatePicker:(nullable UIView*)aView date:(nullable NSDate *)date minDate:(nullable NSDate *)minDate maxDate:(nullable NSDate *)maxDate complete:(void(^ _Nullable)(NSDate * date) )complete;

///  显示 日期选择指示器
/// - Parameter superView: superView description
- (void)showPicker:(UIView *)superView;


///  隐藏 日期选择指示器
- (void)hidePicker;
@end

NS_ASSUME_NONNULL_END
